package com.chixing.fourteen.service.impl;

import com.chixing.fourteen.pojo.Model;
import com.chixing.fourteen.repository.ModelRepository;
import com.chixing.fourteen.service.ModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Y2014188432
 */
@Service
public class ModelServiceImpl implements ModelService {

    @Autowired
    private ModelRepository modelRepository;


    @Override
    /**
     * 获取所有车型
     * 测试：http://localhost:8080/test/getModel
     */
    public List<Model> findAll() {
        return modelRepository.selectAll();
    }
}
